<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
    #parse("/h5/common/webWords.html")
<link rel="stylesheet" type="text/css" href="http://${staticHost}/css/medioadaption.css">
<link rel="stylesheet" type="text/css" href="http://${staticHost}/css/stcss.css">
<script type="text/javascript" src="http://${staticHost}/js/jquery.js"></script>
<script type="text/javascript" src="http://${staticHost}/js/continuingEducation.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://${staticHost}/css/style1.css" /><script src="http://${staticHost}/js/layer.js"></script>
    <script type="text/javascript">
        function showMessage(msg){
            layer.open({
                content: msg
                ,btn: '关闭'
            });
        }
    	function modifyPwd(){
    		
    		var oldPassWord = $("#oldPassWord").val();
    		var newPassWord = $("#newPassWord").val();
    		var confirmNewPassWord = $("#confirmNewPassWord").val();
    		
    		if(oldPassWord == '' || newPassWord == '' || confirmNewPassWord == ''){
    			showMessage("密码不能为空,请重新输入!");
    		}
    		
    		if(newPassWord != confirmNewPassWord){
    			showMessage("确认密码与新密码不符,请重新输入!");
    		}
    		
    		$.ajax({
                type:'post',
                url:'/edu/auth/doModifyPwdByMap',
                contentType:'application/x-www-form-urlencoded; charset=utf-8',
                data:{
                	oldPassWord:oldPassWord,
                	newPassWord:newPassWord,
                	confirmNewPassWord:confirmNewPassWord
                },
                success: function (result) {
                    if(result.status == '00000000'){
                        showMessage("修改成功");
                        var url = $("#toUrl").val();
                        window.location.href='/'+url;
                    }else if(result.status == '200000002'){
                        $("#phoneNumberDiv").text(result.message);
                    } else{
                        showMessage(result.message);
                    }

                }
            });
    	}
</script>
<style type="text/css">
    .jobtitle1{
        font-size: 18px;
        height: 50px;
        line-height: 50px;
        color: #333333;
        background-color: #fefeff;
        border-bottom: 1px solid #f8f7fc;
    }
</style>
</head>
<body style="background:#f8f7fc;">
<div style="background: white;">
<div align="center" class="jobtitle1">修改密码</div>
<input type="hidden" id="toUrl" value="$!toUrl">
<div class="login-box">
                    <div class="login-box-width">
                        <ul>
                            <li>
                                <div class="form-box">
                                    <input type="password" id="oldPassWord" placeholder="当前密码">
                                </div>
                                
                            </li>
                                                       
                            <li>
                                <div class="form-box clearfix">
                                    <input type="password" id="newPassWord" placeholder="新密码">
                                </div>
                                
                            </li>
                            <li class="password-input">
                                <div class="form-box clearfix">
                                    <input type="password" id="confirmNewPassWord" placeholder="确认密码">
                                </div>
                               
                            </li>
                        </ul>
                        
                    </div>
                    <div class="md_dl"><a href="javascript:void(0)" onclick="modifyPwd()"><input name="" class="global-button-big" value="确认修改" style="width:290px; height:42px; margin-top:20px;color: white; margin-bottom:30px;text-align: center;font-size: 1.6rem;" /></a></div>
                </div>
</div>
<div class="holderdiv"></div>
<div class="fixdiv">
  <ul>               
    <li><a href="javascript:void(0)" onclick="window.history.go(-1)"><img src="http://${staticHost}/images/foticon001.jpg"><span>返回</span></a></li>
    <li><a href="javascript:void(0)"><img src="http://${staticHost}/images/foticon004.jpg"><span>重置密码</span></a></li>
    <li><a href="javascript:void(0)" onclick="loginOut()"><img src="http://${staticHost}/images/foticon003.jpg"><span>退出系统</span></a></li>

  </ul>
</div>
<script type="text/javascript">
    function showMessage(msg){
        layer.open({
            content: msg
            ,btn: '关闭'
        });
    }
    function loginOut(){
        $.ajax({
            type:'post',
            url:'/edu/auth/loginOut',
            contentType:'application/x-www-form-urlencoded; charset=utf-8',
            success: function (result) {
                showMessage("您已安全退出梦想在线业务员服务系统");
                window.location.href='/edu/public/salesManLogin';
            }
        });
    }
</script>
</body>
</html>